package edu.zhku.myList;

import java.util.ArrayList; 

public class MyList {

	public static void main(String[] args) {
		
	ArrayList<String>actor = new ArrayList<String>();
	//增加
	actor.add("韦小宝");
	actor.add("陈敬南");
	actor.add("方世玉");
	
	//删除
	actor.remove(2);
	
	//修改
	actor.set(1, "陈家洛");
	
	//查询
	System.out.println("是否有这个人：" + actor.contains("陈敬南"));
	
	//遍历输出
	for(int i = 0;i < actor.size();i ++ )
	{
		System.out.println(actor.get(i));
	}
	
	}

}
